<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>新增的方法</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="migration53.class-constants.html">新增的类常量</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="migration53.new-extensions.html">新的扩展</a></div>
 <div class="up"><a href="migration53.html">从 PHP 5.2.x 移植到 PHP 5.3.x</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="migration53.methods" class="section">
  <h2 class="title">新增的方法</h2>
  <p class="simpara">
   5.3.0 中新增了若干方法:
  </p>

  <p class="simpara"><a href="book.datetime.html" class="link">日期/时间</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="datetime.add.html" class="function">DateTime::add()</a></span>
     - 向一个 <a href="class.datetime.html" class="classname">DateTime</a> 对象加上若干天, 月, 年, 小时, 分钟和秒.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="datetime.createfromformat.html" class="function">DateTime::createFromFormat()</a></span>
     - 根据给定的格式, 返回一个新的格式化的<a href="class.datetime.html" class="classname">DateTime</a>对象.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="datetime.diff.html" class="function">DateTime::diff()</a></span>
     - 返回两个 <a href="class.datetime.html" class="classname">DateTime</a> 对象的不同之处.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="datetime.getlasterrors.html" class="function">DateTime::getLastErrors()</a></span>
     - 返回最后的日期/时间处理中的警告和错误.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="datetime.sub.html" class="function">DateTime::sub()</a></span>
     - 从 <a href="class.datetime.html" class="classname">DateTime</a> 对象中减去若干天, 月, 年, 小时, 分钟和秒.
    </span>
   </li>
  </ul>

  <p class="simpara"><strong class="classname">异常(Exception)</strong>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="exception.getprevious.html" class="function">Exception::getPrevious()</a></span>
     - 获取前一个异常.
    </span>
   </li>
  </ul>

  <p class="simpara"><a href="book.dom.html" class="link">DOM</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="domnode.getlineno.html" class="function">DOMNode::getLineNo()</a></span>
     - 返回解析节点的行数.
    </span>
   </li>
  </ul>

  <p class="simpara"><a href="ref.pdo-firebird.html" class="link">PDO_FIREBIRD</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="pdo.setattribute.html" class="function">PDO::setAttribute()</a></span>
     - 设置属性.
    </span>
   </li>
  </ul>

  <p class="simpara"><a href="book.reflection.html" class="link">反射(Reflection)</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="methodname"><a href="reflectionclass.getnamespacename.html" class="methodname">ReflectionClass::getNamespaceName()</a></span>
     - 返回类定义所在命名空间的的名称.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="methodname"><a href="reflectionclass.getshortname.html" class="methodname">ReflectionClass::getShortName()</a></span>
     - 返回类的短名称(没有命名空间部分).
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="methodname"><a href="reflectionclass.innamespace.html" class="methodname">ReflectionClass::inNamespace()</a></span>
     - 返回类是否定义于一个命名空间.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="methodname"><strong>ReflectionFunction::getNamespaceName()</strong></span>
     - 返回函数定义所在命名空间的名字.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="methodname"><strong>ReflectionFunction::getShortName()</strong></span>
     - 返回函数的段名称(没有命名空间部分).
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="methodname"><strong>ReflectionFunction::inNamespace()</strong></span>
     - 返回函数在一个命名空间中是否被定义.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="methodname"><a href="reflectionproperty.setaccessible.html" class="methodname">ReflectionProperty::setAccessible()</a></span>
     - 设置是否可以请求非 public 属性.
    </span>
   </li>
  </ul>

  <p class="simpara"><a href="book.spl.html" class="link">SPL</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="splobjectstorage.addall.html" class="function">SplObjectStorage::addAll()</a></span>
     - 从另一个 SplObjectStorage 对象中新增全部元素.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="splobjectstorage.removeall.html" class="function">SplObjectStorage::removeAll()</a></span>
     - 从另一个 SplObjectStorage 对象中移除全部元素.
    </span>
   </li>
  </ul>

  <p class="simpara"><a href="book.xsl.html" class="link">XSL</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="xsltprocessor.setprofiling.html" class="function">XSLTProcessor::setProfiling()</a></span>
     - 设置概况输出文件.
    </span>
   </li>
  </ul>
 </div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="migration53.class-constants.html">新增的类常量</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="migration53.new-extensions.html">新的扩展</a></div>
 <div class="up"><a href="migration53.html">从 PHP 5.2.x 移植到 PHP 5.3.x</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
